import yaml


def write_data(path, data):
    """
    :param path: 写入文件路径
    :param data: 写入数据
    """

    with open(path, 'w', encoding='utf-8') as f:
        yaml.dump_all(documents=[data], stream=f, allow_unicode=True)
